<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div style="display:flex;flex-wrap:wrap;">
   {%for book in rs%}
      <div style="margin:10px">
          <div>
              <a href="todetail?id={{book[0]}}">
                  <img src="{{book[4]}}" width="200px" height="200px"/>
              </a>

          </div>
          <div>{{book[1]|truncate(10)}}</div>
      </div>
   {%endfor%}
    </div>
</body>
</html>